package cn.gmy.day0721_JavaIO;

import java.io.*;

public class TestIOThree {
	
	public static void main(String[] args) {		
		//�û����ַ���д��һ���ļ���д�����ݣ����һ��У� Ȼ���û����ַ�����ȡ����ļ��� һ��һ�еĶ�ȡ		
		BufferedWriter bw = null;		
		BufferedReader br = null;
		try{			
			bw = new BufferedWriter(new FileWriter("C:\\Users\\wang\\Desktop\\eat.txt"));			
			br = new BufferedReader(new FileReader("C:\\Users\\wang\\Desktop\\eat.txt"));
			for(int i = 0; i < 100; i++) {
				String str = String.valueOf(Math.random());
				bw.write(str);
				bw.newLine();
			}			
			bw.flush();			
			String str2 = null;			
			while((str2 = br.readLine()) != null) {
				System.out.println(str2);
			}
		} catch(Exception e) {
		} finally{
			try {
				br.close();
				bw.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}		
	}
}
